<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
	<!DOCTYPE html>
<html class="no-js">
<head>
	<meta name="author" content="蓝凌科技">
	<meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
	<meta name="renderer" content="webkit"/>
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<link href="/Public/Blovex4/css/amazeui.css" rel="stylesheet">
	<link href="/Public/Blovex4/css/amaze.css" rel="stylesheet">
	<link href="/Public/Blovex4/css/admin.css" rel="stylesheet">
	<link href="/Public/Blovex4/css/jquery.datetimepicker.css" rel="stylesheet">
	<link href="/Public/Blovex4/css/custom.css" rel="stylesheet">
	<link href="/Public/Common/css/amazeui.datetimepicker.css" rel="stylesheet">
	<title><?php echo C('WEB_SITE_TITLE');?></title>
	
	<script type="text/javascript">
	    var _root = '<?php echo ($_site_url); echo U(' / ');?>', _controller = '<?php echo ($_controller); ?>';
	</script>
	
	
	

	<!-- 页面header钩子，一般用于加载插件CSS文件和代码 -->


</head>
<body  style="overflow:hidden;">
	<!-- 头部 -->
	<!-- 导航条
================================================== -->
<header id="amz-header" class="am-topbar am-topbar-fixed-top" >
    <div class="am-g">
        <div class="col-md-2 am-u-md-2">
            <h1>
            	<a href="#" target="_blank">帮工小哥</a>
            	<span class="am-badge am-badge-danger"><?php echo (C("APP_VERSION")); ?></span>
            </h1>
        <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}">
            <span class="am-sr-only">导航切换</span>
            <span class="am-icon-bars"></span>
        </button>
		</div>
        
        <div class="col-md-10 am-u-md-10">
           
            <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
            	<ul class="amz-header-nav am-topbar-nav">
                    <?php if(is_array($__MENU__['main_menu'])): foreach($__MENU__['main_menu'] as $key=>$vo): ?><li>
                            <a href="<?php echo (U($vo["menu_url"])); ?>" style="outline:none;"><?php echo ($vo["menu_name"]); ?></a>
                        </li><?php endforeach; endif; ?>
                   
                </ul>
                <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">
                    <li>
                        <a href="<?php echo U('Public/logout');?>"><span class="am-icon-sign-out" style="color:white;">注销</span></a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</header>


	<style type="text/css">
		ul li{
			
			list-style:none;
		}
	</style>
	

	<!-- /头部 -->
	
	<!-- 主体 -->
	<div class="am-cf am-g">
    <!--左边开始---->
    <div class="am-u-sm-2 am-u-md-2 am-u-lg-2 admin-sidebar am-offcanvas am-offcanvas-style" id="admin-offcanvas">
        <div class="am-offcanvas-bar admin-offcanvas-bar left-style" >
   
	<div class="am-g admin-style">
        <div class="am-u-sm-4">
            <a href="#" class="am-icon-btn am-secondary  am-icon-drupal"></a>
        </div>
        <div class="am-u-sm-8">
            <?php echo ($ADMIN_NAME); ?>
            <br/>
            <a style="cursor:pointer;" title="退出" href="<?php echo U('Public/logout');?>"><span class="am-icon-power-off"></span></a>
            &nbsp; <a style="cursor:pointer;" title="修改密码" href="<?php echo U('Index/updatePassword');?>"><span class="am-icon-lock"></span></a>
        </div>
    </div>
    <ul class="am-list" >
        <?php if(is_array($__MENU__['_child'])): foreach($__MENU__['_child'] as $key=>$sub_menu): if(!empty($sub_menu)): ?><li>
            <a href="<?php echo (U($sub_menu["menu_url"])); ?>"><span class="<?php echo ((isset($sub_menu["menu_icon"]) && ($sub_menu["menu_icon"] !== ""))?($sub_menu["menu_icon"]):''); ?>">&nbsp;</span><?php echo ($sub_menu["menu_name"]); ?><span class="<?php echo ((isset($sub_menu["menu_style"]) && ($sub_menu["menu_style"] !== ""))?($sub_menu["menu_style"]):''); ?>"></span></a>
            <?php if(is_array($sub_menu['_child'])): foreach($sub_menu['_child'] as $key=>$menuname): ?><li class="am-margin-horizontal">
                    <a href="<?php echo (U($menuname["menu_url"])); ?>"><span class="<?php echo ((isset($menuname["menu_icon"]) && ($menuname["menu_icon"] !== ""))?($menuname["menu_icon"]):''); ?>">&nbsp;</span><?php echo ($menuname["menu_name"]); ?><span class="<?php echo ((isset($menuname["menu_style"]) && ($menuname["menu_style"] !== ""))?($menuname["menu_style"]):''); ?>"></span></a>
                </li><?php endforeach; endif; endif; ?>
        </li><?php endforeach; endif; ?>
    </ul>
</div>

    </div><!--左边结束---->
    <div class="am-u-sm-10 am-u-md-10 am-u-lg-10 custom-left am-fr" id="Contename"   >
        <div id="top-alert" class="fixed alert alert-error am-u-sm-12 am-u-md-12" style="display:none">
            <button class="close fixed" style="margin-top: 4px;">
                &times;
            </button>
            <div class="alert-content">
                这是内容
            </div>
        </div>
        
    <div class="am-cf am-padding-top">
        <div class="am-fl am-cf">
            <i class="am-icon-cog"></i>
            <strong class="am-text-primary am-text-lg">配置设置</strong>
        </div>
        <hr data-am-widget="divider" class="am-divider am-divider-default" />
    </div>
    
        <div class="am-tabs am-margin" data-am-tabs-noswipe="1" data-am-tabs>
            <ul class="am-tabs-nav am-nav am-nav-tabs">
            	<?php if(!empty($list)): if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$tag): $mod = ($i % 2 );++$i;?><li <?php if(key == 1): ?>class="am-active"<?php endif; ?> >
	                    <a href="#tab<?php echo ($key); ?>"><?php echo ($tag["tab_name"]); ?>配置</a>
	                </li><?php endforeach; endif; else: echo "" ;endif; endif; ?>
                <li>
                    <a href="#tab0">增加配置</a>
                </li>
            </ul>
            
            <div class="am-tabs-bd">
            	
            	<?php if(!empty($list)): if(is_array($list)): $k = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$tag): $mod = ($k % 2 );++$k;?><div <?php if(k == 1): ?>class="am-tab-panel am-in am-active" <?php else: ?> class="am-tab-panel"<?php endif; ?> id="tab<?php echo ($k); ?>">
		                	<form  class="am-form am-form-<?php echo ($k); ?>" action="<?php echo U('Config/edit');?>">
		                	<?php if(is_array($tag['config'])): $i = 0; $__LIST__ = $tag['config'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$config): $mod = ($i % 2 );++$i;?><div class="am-g am-margin-top">
			                    	
			                        <div class="am-u-sm-2 am-text-right">
			                            <?php echo ($config["config_info"]); ?>
			                        </div>
			                        <div class="am-u-sm-4">
			                                
			                                <?php switch($config["config_type"]): case "number": ?><input type="number" class="am-form-field am-input-sm" name="<?php echo ($config["config_name"]); ?>" value="<?php echo ($config["config_value"]); ?>"><?php break;?>
					                            <?php case "string": ?><input type="text" class="am-form-field am-input-sm" name="<?php echo ($config["config_name"]); ?>" value="<?php echo ($config["config_value"]); ?>"><?php break;?>
					                            <?php case "textarea": ?><textarea class="am-form-field am-input-sm" rows="2" name="<?php echo ($config["config_name"]); ?>"><?php echo ($config["config_value"]); ?></textarea><?php break;?>
					                            <?php case "richtext": ?><textarea class="am-input-sm am-input-sm-rich" rows="2" 
				                                		name="<?php echo ($config["config_name"]); ?>" id="<?php echo ($config["config_name"]); ?>"><?php echo ($config["config_value"]); ?></textarea><?php break;?>
					                            <?php case "bool": ?><label class="am-radio-inline">
					                                    <input type="radio" name="<?php echo ($config["config_name"]); ?>" value="0" data-am-ucheck 
					                                    	<?php if(($config["config_value"]) == "0"): ?>checked<?php endif; ?> />是
					                                </label>
					                                <label class="am-radio-inline">
					                                    <input type="radio" name="<?php echo ($config["config_name"]); ?>" value="1" data-am-ucheck
					                                    	<?php if(($config["config_value"]) == "1"): ?>checked<?php endif; ?> >否
					                                </label><?php break;?>
					                            <?php case "array": ?><textarea class="am-form-field am-input-sm" rows="2" name="<?php echo ($config["config_name"]); ?>"><?php echo ($config["config_value"]); ?></textarea><?php break;?>
					                            <?php case "extra": ?><select data-am-selected="{ btnSize: 'sm', btnStyle: 'secondary'}" name="<?php echo ($config["config_name"]); ?>">
                                   
				            							<?php $_result=parse_config_attr($config['config_extra']);if(is_array($_result)): $i = 0; $__LIST__ = $_result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($key); ?>" <?php if(($config["config_value"]) == $key): ?>selected<?php endif; ?>><?php echo ($vo); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
					            						
					                                </select><?php break; endswitch;?>
			                                
			                        </div>
			                        <div class="am-u-sm-3">
			                            <span class="am-text-secondary">（<?php echo ($config["remark"]); ?>）</span>
			                        </div>
									<div  class="am-u-sm-3">
			                    		<?php echo ($config["config_name"]); ?>
			                    	</div>
			                    </div><?php endforeach; endif; else: echo "" ;endif; ?>
		                    <?php if(!empty($tag['config'])): ?><div class="am-margin">
			                    <button type="submit" class="am-btn am-btn-success am-btn-xs ajax-post" target-form="am-form-<?php echo ($k); ?>">
			                        提交保存
			                    </button>
			                </div><?php endif; ?>
		                    </form>
		                </div><?php endforeach; endif; else: echo "" ;endif; endif; ?>
                
                <div class="am-tab-panel" id="tab0">
                    <form class="am-form am-form-0" action="<?php echo U('Config/add');?>">
                        <div class="am-g am-margin-top-sm">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                配置项英文标识
                            </div>
                            <div class="am-u-sm-8 am-u-md-4 am-u-end">
                                <input type="text" class="am-input-sm" name="config_name" required/>
                            </div>
                        </div>
                        <div class="am-g am-margin-top-sm">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                配置项中文名称
                            </div>
                            <div class="am-u-sm-8 am-u-md-4 am-u-end">
                                <input type="text" class="am-input-sm" name="config_info" required/>
                            </div>
                        </div>
                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                所属标签
                            </div>
                            <div class="am-u-sm-8 am-u-md-4">
                                <select data-am-selected="{ btnSize: 'sm', btnStyle: 'secondary'}" name="config_group">
                                    
                                    <?php if(!empty($list)): if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$tag): $mod = ($i % 2 );++$i;?><option value="<?php echo ($key); ?>"><?php echo ($tag['tab_name']); ?></option><?php endforeach; endif; else: echo "" ;endif; endif; ?>
            						
                                </select>
                            </div>
                            <div class="am-hide-sm-only am-u-md-6">
                            </div>
                        </div>
                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                数据类型
                            </div>
                            <div class="am-u-sm-8 am-u-md-4">
                                <select data-am-selected="{ btnSize: 'sm', btnStyle: 'secondary'}" name="config_type">
                                    <option value="string">单选文本</option>
                                    <option value="textarea">多行文本</option>
                                    <option value="richtext">富文本</option>
                                    <option value="number">数字</option>
                                    <option value="bool">布尔（Y/N)</option>
                                    <option value="array">数组</option>
                                    <option value="extra">枚举</option>
                                </select>
                            </div>
                            <div class="am-hide-sm-only am-u-md-6">
                            </div>
                        </div>
                        <div class="am-g am-margin-top-sm">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                配置值:
                            </div>
                            <div class="am-u-sm-8 am-u-md-4 am-u-end">
                                <textarea class="am-form-field am-input-sm" rows="2" name="config_value" required></textarea>
                            </div>
                            <div class="am-u-md-6">
                            	<span class="am-text-secondary">（如果为数组类型，每行表示数组一个元素，并标识数组索引）</span>
                            </div>
                        </div>
                        <div class="am-g am-margin-top-sm">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                配置值:
                            </div>
                            <div class="am-u-sm-8 am-u-md-4 am-u-end">
                                <textarea class="am-form-field am-input-sm" rows="2" name="config_extra"></textarea>
                            </div>
                            <div class="am-u-md-6">
                            	<span class="am-text-secondary">（如果为枚举型，需配置该项）</span>
                            </div>
                        </div>
                        <div class="am-g am-margin-top-sm">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                配置说明:
                            </div>
                            <div class="am-u-sm-8 am-u-md-4 am-u-end">
                                <input type="text" class="am-input-sm" name="remark"/>
                            </div>
                        </div>
                        <div class="am-margin">
                            <button type="submit" class="am-btn am-btn-success am-btn-xs ajax-post" target-form="am-form-0">
                                提交保存
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        
    </div>
</div>
<a class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}"
  style="z-index:980;"></a>
</body>

</html>

	<!-- /主体 -->

	<!-- 底部 -->
	<!-- 底部
================================================== -->
<footer>
</footer>
<script type="text/javascript">
    (function(){
        var ThinkPHP = window.Think = {
            "ROOT"   : "", //当前网站地址
            "APP"    : "/blovex4.php?s=", //当前项目地址
            "PUBLIC" : "/Public", //项目公共目录地址
            "DEEP"   : "<?php echo C('URL_PATHINFO_DEPR');?>", //PATHINFO分割符
            "MODEL"  : ["<?php echo C('URL_MODEL');?>", "<?php echo C('URL_CASE_INSENSITIVE');?>", "<?php echo C('URL_HTML_SUFFIX');?>"],
            "VAR"    : ["<?php echo C('VAR_MODULE');?>", "<?php echo C('VAR_CONTROLLER');?>", "<?php echo C('VAR_ACTION');?>"]
        }
    })();
</script>
<!--[if lt IE 9]>
    <script src="/Public/Blovex4/js/jquery-1.8.min.js"></script>
    <script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
	<script src="/Public/Blovex4/js/polyfill/rem.min.js"></script>
	<script src="/Public/Blovex4/js/polyfill/respond.min.js"></script>
    <script src="/Public/Blovex4/js/amazeui.legacy.js"></script>
<![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
    <script type="text/javascript" src="/Public/Common/js/jquery-2.0.3.min.js">
    </script>
    <script type="text/javascript" src="/Public/Common/js/amazeui.min.js">
    </script>
<!--<![endif]-->
<script src="/Public/Common/js/jquery.datetimepicker.js" type="text/javascript">
</script>
<script src="/Public/Blovex4/js/think.js" type="text/javascript">
</script>
<script src="/Public/Blovex4/js/custom.js" type="text/javascript">
</script>
<script src="/Public/Common/js/jquery.nicescroll.js" type="text/javascript">
</script>

    <script src="/Public/Common/js/ueditor/ueditor.config.js" type="text/javascript"></script>
    <script src="/Public/Common/js/ueditor/ueditor.all.min.js" type="text/javascript"></script>
    <script src="/Public/Common/js/ueditor/lang/zh-cn/zh-cn.js" type="text/javascript"></script>
    
    <script type="text/javascript">

    	(function($){
    		
    		var richText = $(".am-input-sm-rich");
    		richText.each(function(i){
    			
    			UE.getEditor($(this).attr('id'),{
    		        toolbars:[[
    		        "fullscreen", '|', 'undo', 'redo', "|","bold", "italic", "underline", 'fontborder', 
    		        'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch',
    		        'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 
    		        'insertunorderedlist', 'selectall', 'cleardoc', "|", 
    		        'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
    		        'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
    		        'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', 'insertimage']],
    		        wordCount:false,enableAutoSave:false,elementPathEnabled:false
    			});
    			
    		});
    	})(jQuery);
    </script>

<!-- 用于加载js代码 -->


	<!-- /底部 -->
</body>
</html>